Referring to FIG. 1, a conventional photoelectric tilt switch disclosed in U.S. Pat. No. 6,800,841 B1 includes a housing 11, a cover 12, a modular insert body 13, a light emitter 14, a light receiver 15 and a roller 16. By virtue of the modular insert body 13 which is inserted into the housing 11 to define a closed light passage between the light emitter 14 and the light receiver 15, the tilt switch is able to have various degrees of sensitivity by replacement of the modular insert body 13 so as to be used for different kinds of electric apparatuses. However, the modular insert body is relatively inconvenient to assemble and results in a higher cost.